package com.mzx.admin.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mzx.entity.Admin;
import com.mzx.entity.BaseDict;
import com.mzx.entity.Info;
import com.mzx.mapper.AdminMapper;

@Service
public class AdminService {
@Autowired
private AdminMapper adminMapper;
public  Admin login(Admin admin) {
	
	return admin =adminMapper.selectAdminByanameAndapassword(admin);
}
			/*加载下拉列表*/
public List<BaseDict> LoadInfo(String bcode){
return adminMapper.selectByBcode(bcode);

}
			/*查询所有维修信息业务*/
public List<Info> getInfos() {
	return adminMapper.selectInfos();
	
}
			/*修改维修状态业务*/
public Boolean changeInfo(Info info) {
	
	return adminMapper.updateStateByCarcode(info);
}

}
